package com.guaoran.headFirst.stategy;

import com.guaoran.headFirst.stategy.interfaces.impl.FlyWithWings;
import com.guaoran.headFirst.stategy.interfaces.impl.ModelDuck;
import com.guaoran.headFirst.stategy.interfaces.impl.MuteQuack;

/**
 * @author : guaoran
 * @Description : <br/>
 * @date :2018/12/20 14:11
 */
public class TestDemo {
    public static void main(String[] args) {
        ModelDuck modelDuck = new ModelDuck();
        modelDuck.quackBehavior.quack();
        modelDuck.flyBehavior.fly();
        modelDuck = new ModelDuck(new FlyWithWings(),new MuteQuack());
        modelDuck.quackBehavior.quack();
        modelDuck.flyBehavior.fly();
    }
}
